home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Compendium Deluxe 1
/
LSD Compendium Deluxe 1.iso
/
a
/
disk
/
misc
/
string11.lha
/
freeclop.c
< prev
next >
Wrap
C/C++ Source or Header
|
1990-12-30
|
635b
|
36 lines
/*
* FILE
* freeclop.c
*
* DESCRIPTION
* This function will release all memory allocated by the
* clop() function.
*
* AUTHOR
* Anders 'ALi' Lindgren
* Mälarblick 8
* S-161 51 Bromma
* Sweden
*/
#include "stdlib.h"
#include "clop.h"
void __stdargs
freeclop(struct clop_array * clop_array)
{
register int i;
for (i=0; clop_array[i].type != CLOPT_END; i++) {
if (clop_array[i].type == CLOPT_STRING) {
if(clop_array[i].outflags & CLOPOF_ALLOCATED) {
free(clop_array[i].value.string);
clop_array[i].outflags &= ~CLOPOF_ALLOCATED;
}
clop_array[i].value.string = NULL;
}
}
return;
}